package persistence.utilisateur;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import static javax.persistence.GenerationType.IDENTITY;

/**
 * 
 * @author Guillaume
 *
 */
@Entity
@Table(name = "CLIENT" )
public class Client extends Utilisateur implements Serializable {

	private String nom;

	private String prenom;

	private String numRue;

	private String nomRue;

	private String CP;

	private String ville;

	private String telephone;

	private int id;

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name="CLIENT_ID")
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column(name="MAIL", length=80, nullable=false)
	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	@Column(name="PASS", length=80, nullable=false) 
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name="NOM", length=80, nullable=false)
	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}
	
	@Column(name="PRENOM", length=80, nullable=false)
	public String getPrenom() {
		return prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	@Column(name="NUMRUE", length=80, nullable=false)
	public String getNumRue() {
		return numRue;
	}

	public void setNumRue(String numRue) {
		this.numRue = numRue;
	}
	
	@Column(name="NOMRUE", length=80, nullable=false)
	public String getNomRue() {
		return nomRue;
	}

	public void setNomRue(String nomRue) {
		this.nomRue = nomRue;
	}

	@Column(name="VILLE", length=80, nullable=false)
	public String getVille() {
		return ville;
	}

	public void setVille(String ville) {
		this.ville = ville;
	}

	@Column(name="TELEPHONE", length=20, nullable=false)
	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	@Column(name="CP", length=30, nullable=false)
	public String getCP() {
		return CP;
	}

	public void setCP(String cP) {
		CP = cP;
	}
	// CONSTRUCTEUR OBLIGATOIRE
	public Client()
	{
	}
	
	@Override
	public String affichage()
	{
		return "Bienvenue "+this.prenom+" "+this.nom;
	}
	
	
}
